<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 声明变量
        let age;
        // 赋值
        age = 18;        
        // 控制台输出变量
        console.log(age);   

        // 声明变量的同时赋值又叫初始化
        let name = '张三';
        console.log(name);

        // 更新变量
        age = 20;
        name = '李四';
        console.log(age, name);

        // 声明多个变量
        // 不提倡
        // let gender = '男', hobby = '打篮球';
        let gender = '男';
        let hobby = '打篮球';
        console.log(gender, hobby);
    </script>
</body>
</html>